#ifndef __TR69_HANDLER_H__
#define __TR69_HANDLER_H__

#include "tr69_handler_ext.h"
#include "tr69_handler_table.h"
#include "suci.h"
#include "tr_uciconfig.h"
#include "log.h"
#include "string.h"

int get_DUX_Charter_RA_Enable(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_get(DUX_Charter_RA_Enable, value);
	if(ret)
	{
		return -1;
	}
	tr_log(LOG_DEBUG,"get value [%s]",value);
	return ret;
}
int set_DUX_Charter_RA_Enable(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_set(DUX_Charter_RA_Enable, value);
	if(ret)
	{
		return (-1);
	}
	else
	{
		ret = do_uci_commit(MS);
		if(ret)
		{
			return (-1);
		}
	}
	tr_log(LOG_DEBUG,"set value [%s]",value);
	return ret;
}
int get_DUX_Charter_RA_Ports(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_get(DUX_Charter_RA_Ports, value);
	if(ret)
	{
		return -1;
	}
	tr_log(LOG_DEBUG,"get value [%s]",value);
	return ret;
}
int set_DUX_Charter_RA_Ports(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_set(DUX_Charter_RA_Ports, value);
	if(ret)
	{
		return (-1);
	}
	else
	{
		ret = do_uci_commit(MS);
		if(ret)
		{
			return (-1);
		}
	}
	tr_log(LOG_DEBUG,"set value [%s]",value);
	return ret;
}
int get_DUX_Charter_RA_SupportedProtocols(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_get(DUX_Charter_RA_SupportedProtocols, value);
	if(ret)
	{
		return -1;
	}
	tr_log(LOG_DEBUG,"get value [%s]",value);
	return ret;
}
int get_DUX_Charter_RA_Protocols(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_get(DUX_Charter_RA_Protocols, value);
	if(ret)
	{
		return -1;
	}
	tr_log(LOG_DEBUG,"get value [%s]",value);
	return ret;
}
int set_DUX_Charter_RA_Protocols(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_set(DUX_Charter_RA_Protocols, value);
	if(ret)
	{
		return (-1);
	}
	else
	{
		ret = do_uci_commit(MS);
		if(ret)
		{
			return (-1);
		}
	}
	tr_log(LOG_DEBUG,"set value [%s]",value);
	return ret;
}
int get_DUX_Charter_RA_AllowAnyIP(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_get(DUX_Charter_RA_AllowAnyIP, value);
	if(ret)
	{
		return -1;
	}
	tr_log(LOG_DEBUG,"get value [%s]",value);
	return ret;
}
int set_DUX_Charter_RA_AllowAnyIP(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_set(DUX_Charter_RA_AllowAnyIP, value);
	if(ret)
	{
		return (-1);
	}
	else
	{
		ret = do_uci_commit(MS);
		if(ret)
		{
			return (-1);
		}
	}
	tr_log(LOG_DEBUG,"set value [%s]",value);
	return ret;
}
int get_DUX_Charter_RA_AllowedIpRangeNumberOfEntries(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_get(DUX_Charter_RA_AllowedIpRangeNumberOfEntries, value);
	if(ret)
	{
		return -1;
	}
	tr_log(LOG_DEBUG,"get value [%s]",value);
	return ret;
}
int set_DUX_Charter_RA_AllowedIpRangeNumberOfEntries(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_set(DUX_Charter_RA_AllowedIpRangeNumberOfEntries, value);
	if(ret)
	{
		return (-1);
	}
	else
	{
		ret = do_uci_commit(MS);
		if(ret)
		{
			return (-1);
		}
	}
	tr_log(LOG_DEBUG,"set value [%s]",value);
	return ret;
}
int get_DUX_Charter_RA_MaxAllowedIpRangeNumberOfEntries(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_get(DUX_Charter_RA_MaxAllowedIpRangeNumberOfEntries, value);
	if(ret)
	{
		return -1;
	}
	tr_log(LOG_DEBUG,"get value [%s]",value);
	return ret;
}
int get_DUX_Charter_RAAt_Enable(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_get(DUX_Charter_RAAt_Enable, value);
	if(ret)
	{
		return -1;
	}
	tr_log(LOG_DEBUG,"get value [%s]",value);
	return ret;
}
int set_DUX_Charter_RAAt_Enable(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_set(DUX_Charter_RAAt_Enable, value);
	if(ret)
	{
		return (-1);
	}
	else
	{
		ret = do_uci_commit(MS);
		if(ret)
		{
			return (-1);
		}
	}
	tr_log(LOG_DEBUG,"set value [%s]",value);
	return ret;
}
int get_DUX_Charter_RAAt_StartIp(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_get(DUX_Charter_RAAt_StartIp, value);
	if(ret)
	{
		return -1;
	}
	tr_log(LOG_DEBUG,"get value [%s]",value);
	return ret;
}
int set_DUX_Charter_RAAt_StartIp(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_set(DUX_Charter_RAAt_StartIp, value);
	if(ret)
	{
		return (-1);
	}
	else
	{
		ret = do_uci_commit(MS);
		if(ret)
		{
			return (-1);
		}
	}
	tr_log(LOG_DEBUG,"set value [%s]",value);
	return ret;
}
int get_DUX_Charter_RAAt_EndIp(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_get(DUX_Charter_RAAt_EndIp, value);
	if(ret)
	{
		return -1;
	}
	tr_log(LOG_DEBUG,"get value [%s]",value);
	return ret;
}
int set_DUX_Charter_RAAt_EndIp(char * path_name, char *value)
{
	int ret = 0;
	tr_log(LOG_DEBUG,"path_name[%s]",path_name);
	ret = do_uci_set(DUX_Charter_RAAt_EndIp, value);
	if(ret)
	{
		return (-1);
	}
	else
	{
		ret = do_uci_commit(MS);
		if(ret)
		{
			return (-1);
		}
	}
	tr_log(LOG_DEBUG,"set value [%s]",value);
	return ret;
}

#endif
